<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>美兰数据文化馆与图书馆</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/formSelects-v4.css" media="all">
</head>
<style>
    .layui-form-label {
        width: 120px;
    }

    .layui-input-block {
        margin-left: 150px;
    }

    #Images li {
        float: left;
        margin: 0.5%;
        overflow: hidden;
        width: 19%;
    }

    #Images li img {
        cursor: pointer;
        width: 100%;
    }

    #Images li .operate {
        background: #f4f5f9 none repeat scroll 0 0;
        display: block;
        height: 40px;
        width: 100%;
    }

    #Images li .operate .check {
        float: left;
        height: 18px;
        margin-left: 11px;
        padding: 11px 0;
        position: relative;
        width: 30%;
    }

    #Images li .operate .check .layui-form-checkbox[lay-skin="primary"] {
        width: 100%;
    }

    #Images li .operate .check .layui-form-checkbox[lay-skin="primary"] span {
        box-sizing: border-box;
        padding: 0 5px 0 25px;
        width: 100%;
    }

    #Images li .operate .check .layui-form-checkbox[lay-skin="primary"] i {
        left: 0;
        position: absolute;
        top: 0;
    }

    #Images li .operate .img_del {
        cursor: pointer;
        float: right;
        font-size: 22px !important;
        margin: 9px 11px 0 0;
    }

    #Images li .operate .img_del:hover {
        color: #f00;
    }

    /* 底部固定区域 */
    .layui-layout-admin .layui-footer {
        padding: 10px 0;
        text-align: center;
    }

    .layui-layout-admin .layui-footer {
        background-color: #fff;
    }

</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab-content">
                <form class="layui-form" lay-filter="component-form-element">
                    <div class="layui-tab layui-tab-brief" lay-filter="component-tabs-hash">
                        <ul class="layui-tab-title">
                            <li class="layui-this" lay-id="11">基本信息</li>
                            <li lay-id="22">详细信息</li>
                            <li lay-id="33">维护项目</li>
                            <li lay-id="44">图片信息</li>
                            <li lay-id="55">扩展信息</li>
                        </ul>
                        <div class="layui-tab-content" style="height: auto">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-sm6" id="doman1">
                                    </div>
                                    <div class="layui-col-sm6" id="doman2">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-sm6" id="doman3">
                                    </div>
                                    <div class="layui-col-sm6" id="doman4">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-sm6" id="doman5">
                                    </div>
                                    <div class="layui-col-sm6" id="doman6">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item" id="doman7">
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-sm6" id="doman8">
                                    </div>
                                    <div class="layui-col-sm6" id="doman9">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item layui-layout-admin">
                        <div class="layui-footer" style="left: 0;padding: 0px;">
                            <button class="layui-btn" lay-submit lay-filter="*" id="pushButton">立即提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script src="<%=request.getContextPath()%>/huazhi/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['table', 'form', 'upload', 'laydate', 'layer', 'formSelects'], function () {
        var $ = layui.$
            , form = layui.form
            , laydate = layui.laydate,
            layer = layui.layer,
            upload = layui.upload,
            formSelects = layui.formSelects;

        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/rfid/getMongoSearchStructure",
            dataType: "json",
            async: false,
            success: function (data) {
                $.each(data, function (key, value) {
                    if (key == "1") {
                        for (var i = 0; i < value.length; i++) {
                            if ("input" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman1").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman2").append(inputs)
                                    }
                                }
                            }
                            if ("datetime" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman1").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman2").append(inputs)
                                    }
                                    if (value[i].dateformat == "2") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd HH:mm:ss',
                                            calendar: true,
                                            type: 'datetime',
                                        });
                                    } else if (value[i].dateformat == "1") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy年MM月dd日',
                                            calendar: true
                                        });
                                    } else {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd',
                                            calendar: true
                                        });
                                    }
                                }
                            }
                            if ("select" == value[i].type) {
                                if (value[i].state == "1") {
                                    var select = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman1").append(select)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman2").append(select)
                                    }
                                }
                            }
                            if ("selects" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman1").append(selects)
                                    } else {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman2").append(selects)
                                    }
//                                  formSelects.btns(value[i].name, ['select', 'remove', 'reverse', 'skin']);
                                }
                            }
                            if ("textarea" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman1").append(textarea)
                                    } else {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman2").append(textarea)
                                    }
                                }
                            }
                            if ("radio" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman1").append(radio)
                                    } else {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman2").append(radio)
                                    }
                                }
                            }
                            if ("checkbox" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman1").append(checkbox)
                                    } else {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman2").append(checkbox)
                                    }
                                }
                            }
                        }
                    } else if (key == "2") {
                        for (var i = 0; i < value.length; i++) {
                            if ("input" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman3").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman4").append(inputs)
                                    }
                                }
                            }
                            if ("datetime" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman3").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman4").append(inputs)
                                    }
                                    if (value[i].dateformat == "2") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd HH:mm:ss',
                                            calendar: true,
                                            type: 'datetime',
                                        });
                                    } else if (value[i].dateformat == "1") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy年MM月dd日',
                                            calendar: true
                                        });
                                    } else {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd',
                                            calendar: true
                                        });
                                    }
                                }
                            }
                            if ("select" == value[i].type) {
                                if (value[i].state == "1") {
                                    var select = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman3").append(select)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman4").append(select)
                                    }
                                }
                            }
                            if ("selects" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman3").append(selects)
                                    } else {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman4").append(selects)
                                    }
//                                  formSelects.btns(value[i].name, ['select', 'remove', 'reverse', 'skin']);
                                }
                            }
                            if ("textarea" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman3").append(textarea)
                                    } else {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman4").append(textarea)
                                    }
                                }
                            }
                            if ("radio" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman3").append(radio)
                                    } else {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman4").append(radio)
                                    }
                                }
                            }
                            if ("checkbox" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman3").append(checkbox)
                                    } else {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman4").append(checkbox)
                                    }
                                }
                            }
                        }
                    } else if (key == "3") {
                        for (var i = 0; i < value.length; i++) {
                            if ("input" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman5").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman6").append(inputs)
                                    }
                                }
                            }
                            if ("datetime" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman5").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman6").append(inputs)
                                    }
                                    if (value[i].dateformat == "2") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd HH:mm:ss',
                                            calendar: true,
                                            type: 'datetime',
                                        });
                                    } else if (value[i].dateformat == "1") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy年MM月dd日',
                                            calendar: true
                                        });
                                    } else {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd',
                                            calendar: true
                                        });
                                    }
                                }
                            }
                            if ("select" == value[i].type) {
                                if (value[i].state == "1") {
                                    var select = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman5").append(select)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman6").append(select)
                                    }
                                }
                            }
                            if ("selects" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman5").append(selects)
                                    } else {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman6").append(selects)
                                    }
//                                  formSelects.btns(value[i].name, ['select', 'remove', 'reverse', 'skin']);
                                }
                            }
                            if ("textarea" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman5").append(textarea)
                                    } else {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman6").append(textarea)
                                    }
                                }
                            }
                            if ("radio" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman5").append(radio)
                                    } else {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman6").append(radio)
                                    }
                                }
                            }
                            if ("checkbox" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman5").append(checkbox)
                                    } else {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman6").append(checkbox)
                                    }
                                }
                            }
                        }
                    } else if (key == "4") {
                        for (var i = 0; i < value.length; i++) {
                            if ("image" == value[i].type) {
                                var state = '<span  style="display:none"  id="state">' + value[i].state + '</span>'
                                $("#doman7").append(state)
                                if (value[i].state == "1") {
                                    var imageYes = '<input type=hidden id="imageYse" value="' + value[i].isValidate + '">' +
                                        '<input type=hidden id="image" name=image>'
                                    $("#doman7").append(imageYes)
                                    var image = '<blockquote class="layui-elem-quote news_search">' +
                                        '<div class="layui-inline">' +
                                        '<input type="checkbox" name="selectAll" id="selectAll" lay-filter="selectAll" lay-skin="primary" title="全选">' +
                                        '</div>' +
                                        '<div class="layui-inline" style="margin-right:10px">' +
                                        '<a class="layui-btn layui-btn-sm layui-btn-danger batchDel">批量删除</a>' +
                                        '</div>' +
                                        '<div class="layui-inline">' +
                                        '<a class="layui-btn layui-btn-sm uploadNewImg"><i class="layui-icon"></i>上传图片</a>' +
                                        '</div>' +
                                        '</blockquote><ul class="layer-photos-demo" id="Images"></ul>'
                                    $("#doman7").append(image)
                                    form.render('checkbox');
                                } else {
                                    var imageYes = '<input type=hidden id="imageYse" value="' + value[i].isValidate + '">'
                                    $("#doman7").append(imageYes)
                                }
                            }
                        }
                    } else if (key == "5") {
                        for (var i = 0; i < value.length; i++) {
                            if ("input" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman8").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11"  oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11"   onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '<div class="layui-col-xs1">' +
                                                    '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        } else {
                                            if (value[i].dataType == "Int") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input" maxlength="11" oninput="value=value.replace(/[^\\d]+/g,\'\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else if (value[i].dataType == "Double") {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input"  maxlength="11" onkeyup="value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, \'$1\')">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            } else {
                                                inputs = '<div class="layui-form-item">' +
                                                    '<div class="layui-col-xs11">' +
                                                    ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                    ' <div class="layui-input-block">' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +  //判断是input还是select还是其他
                                                    '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' + //
                                                    '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                    '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                    '<input type="text" name="' + value[i].name + '" id="' + value[i].name + '"  placeholder="请输入' + value[i].displayName + '" autocomplete="off" class="layui-input">' +
                                                    '</div>' +
                                                    '</div>' +
                                                    '</div>'
                                            }
                                        }
                                        $("#doman9").append(inputs)
                                    }
                                }
                            }
                            if ("datetime" == value[i].type) {
                                if (value[i].state == "1") {
                                    var inputs = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman8").append(inputs)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            inputs = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">input</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<input type="text" readonly="" name="' + value[i].name + '"  id="' + value[i].name + '" autocomplete="off" class="layui-input">' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman9").append(inputs)
                                    }
                                    if (value[i].dateformat == "2") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd HH:mm:ss',
                                            calendar: true,
                                            type: 'datetime',
                                        });
                                    } else if (value[i].dateformat == "1") {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy年MM月dd日',
                                            calendar: true
                                        });
                                    } else {
                                        laydate.render({
                                            elem: "#" + value[i].name,
                                            btns: ['now', 'confirm'],
                                            theme: 'molv',
                                            format: 'yyyy-MM-dd',
                                            calendar: true
                                        });
                                    }
                                }
                            }
                            if ("select" == value[i].type) {
                                if (value[i].state == "1") {
                                    var select = "";
                                    if (i % 2 == 0) {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman8").append(select)
                                    } else {
                                        if (value[i].isValidate == "yes") {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '<div class="layui-col-xs1">' +
                                                '<div class="layui-form-mid layui-word-aux" style="color: red !important;padding: 10px !important;">*' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        } else {
                                            select = '<div class="layui-form-item">' +
                                                '<div class="layui-col-xs11">' +
                                                ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                                ' <div class="layui-input-block">' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssss">select</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                                '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                                '<select name="' + value[i].name + '"  id="' + value[i].name + '"  lay-filter="aihao"><option value="">请选择' + value[i].displayName + '</option></select>' +
                                                '</div>' +
                                                '</div>' +
                                                '</div>'
                                        }
                                        $("#doman9").append(select)
                                    }
                                }
                            }
                            if ("selects" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman8").append(selects)
                                    } else {
                                        var selects = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">selects</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <select name="' + value[i].name + '"  xm-select="' + value[i].name + '">' +
                                            '</select>' +
                                            ' </div>' +
                                            ' </div>' +
                                            '</div>'
                                        $("#doman9").append(selects)
                                    }
//                                  formSelects.btns(value[i].name, ['select', 'remove', 'reverse', 'skin']);
                                }
                            }
                            if ("textarea" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman8").append(textarea)
                                    } else {
                                        var textarea = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            ' <div class="layui-input-block">' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">textarea</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            '<textarea class="layui-textarea" placeholder="请输入' + value[i].displayName + '" name="' + value[i].name + '"></textarea>' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman9").append(textarea)
                                    }
                                }
                            }
                            if ("radio" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman8").append(radio)
                                    } else {
                                        var radio = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">radio</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman9").append(radio)
                                    }
                                }
                            }
                            if ("checkbox" == value[i].type) {
                                if (value[i].state == "1") {
                                    if (i % 2 == 0) {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman8").append(checkbox)
                                    } else {
                                        var checkbox = '<div class="layui-form-item">' +
                                            '<div class="layui-col-xs11">' +
                                            ' <label class="layui-form-label">' + value[i].displayName + '</label>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssss">checkbox</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'sss">' + value[i].dataType + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ss">' + value[i].displayName + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 's">' + value[i].isValidate + '</span>' +
                                            '<span  style="display:none"  id="' + value[i].name + 'ssssssss">' + value[i].uniqueness + '</span>' +
                                            ' <div class="layui-input-block" id="' + value[i].name + '1">' +
                                            '</div>' +
                                            '</div>' +
                                            '</div>'
                                        $("#doman9").append(checkbox)
                                    }
                                }
                            }
                        }
                    }
                })
            }
        });


        //单选
        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/rfid/getSelectTable",
            dataType: "json",
            async: false,
            success: function (data) {
                for (var i = 0; i < data.length; i++) {
                    $.each(data[i].value, function (j, n) {
                        document.getElementById(data[i].name).options.add(new Option(n.text, n.value));
                    })
                    form.render('select');
                }
            }
        })

        //多选框赋值
        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/rfid/getSelectsTable",
            dataType: "json",
            async: false,
            success: function (data) {
                for (var i = 0; i < data.data.length; i++) {
                    formSelects.data(data.data[i].name, 'local', {
                        arr: data.data[i].data
                    });
                }
            }
        })

        //单选赋值
        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/rfid/getRadioTable",
            dataType: "json",
            async: false,
            success: function (data) {
                for (var i = 0; i < data.data.length; i++) {
                    var name = data.data[i].name
                    for (var j = 0; j < data.data[i].data.length; j++) {
                        if (j == 0) {
                            var radio = '<input type="radio" checked name="' + name + '" value="' + data.data[i].data[j].name + '" title="' + data.data[i].data[j].name + '"/>';
                        } else {
                            var radio = '<input type="radio" name="' + name + '" value="' + data.data[i].data[j].name + '" title="' + data.data[i].data[j].name + '"/>';
                        }
                        $("#" + name + "1").append(radio);
                    }
                    form.render("radio");
                }
            }
        })

        //复选框赋值
        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/rfid/getCheckboxTable",
            dataType: "json",
            async: false,
            success: function (data) {
                for (var i = 0; i < data.data.length; i++) {
                    var name = data.data[i].name
                    for (var j = 0; j < data.data[i].data.length; j++) {
                        var checkbox = '<input type="checkbox" name="' + name + '" value="' + data.data[i].data[j].name + '" title="' + data.data[i].data[j].name + '"/>';
                        $("#" + name + "1").append(checkbox);
                    }
                    form.render("checkbox");
                }
            }
        })

        //图片
        //图片部分
        var state = $("#state").html(); //判断图片是否存在
        if (state == '1') {
            //多图片上传
            upload.render({
                elem: '.uploadNewImg',
                url: '<%=request.getContextPath()%>/rest/rfid/imageProduct',
                multiple: true,
                accept: "images",
                size: 5120,
                before: function (obj) {
                    //预读本地文件示例，不支持ie8
                    obj.preview(function (index, file, result) {
                    });
                },
                done: function (res) {
                    if (res.code == 0) {
                        var image = $("#image").val()
                        if (image == "") {
                            $("#image").val(res.data.imageName)
                        } else {
                            $("#image").val(image + "," + res.data.imageName)
                        }
                        $('#Images').prepend('<li><img layer-src="' + res.data.src + '" src="' + res.data.src + '" class="layui-upload-img" height="253px;" ><div class="operate"><div class="check">' +
                            '<input type="checkbox" name="belle" lay-filter="choose" lay-skin="primary" value="' + res.data.imageName + '" ></div><i class="layui-icon img_del" style="float:right">&#xe640;</i></div></li>')
                        //设置图片的高度
//                        $("#Images li img").height($("#Images li img").width() - 50);
                        form.render("checkbox");
                    }
                }
                , error: function (index, upload) {
                }
            });

            //删除单张图片
            $("body").on("click", ".img_del", function () {
                var _this = $(this);
                layer.confirm('确定删除图片吗？', {
                    icon: 3,
                    title: '提示信息'
                }, function (index) {
                    _this.parents("li").remove();
                    layer.close(index);
                    var img = _this.siblings().find("input").attr("value")
                    var image = $("#image").val()
                    var ss = image.split(",");
                    ss.remove(img);
                    $("#image").val(ss.toString())
                });
            })

            Array.prototype.remove = function (val) {
                var index = this.indexOf(val);
                if (index > -1) {
                    this.splice(index, 1);
                }
            };

            //全选
            form.on('checkbox(selectAll)', function (data) {
                var child = $("#Images li input[type='checkbox']");
                child.each(function (index, item) {
                    item.checked = data.elem.checked;
                });
                form.render('checkbox');
            });

            //通过判断是否全部选中来确定全选按钮是否选中
            form.on("checkbox(choose)", function (data) {
                var child = $(data.elem).parents('#Images').find('li input[type="checkbox"]');
                var childChecked = $(data.elem).parents('#Images').find('li input[type="checkbox"]:checked');
                if (childChecked.length == child.length) {
                    $(data.elem).parents('#Images').siblings("blockquote").find('input#selectAll').get(0).checked = true;
                } else {
                    $(data.elem).parents('#Images').siblings("blockquote").find('input#selectAll').get(0).checked = false;
                }
                form.render('checkbox');
            })

            //批量删除
            $(".batchDel").click(function () {
                var $checkbox = $('#Images li input[type="checkbox"]');
                var $checked = $('#Images li input[type="checkbox"]:checked');
                if ($checkbox.is(":checked")) {
                    layer.confirm('确定删除选中的图片？', {icon: 3, title: '提示信息'}, function (index) {
                        var index = layer.msg('删除中，请稍候', {icon: 16, time: false, shade: 0.6});
                        setTimeout(function () {
                            //删除数据
                            $checked.each(function () {
                                $(this).parents("li").remove();
                                var img = $(this).attr("value")
                                var image = $("#image").val()
                                var ss = image.split(",");
                                ss.remove(img);
                                $("#image").val(ss.toString())
                            })
                            $('#Images li input[type="checkbox"],#selectAll').prop("checked", false);
                            form.render();
                            layer.close(index);
                            layer.msg("删除成功");
                        }, 2000);
                    })
                } else {
                    layer.msg("请选择需要删除的图片");
                }
            })
        }

        //监听提交
        form.on('submit(*)', function (data) {
            var field = data.field//当前容器的全部表单字段，名值对形式：{name: value}
            // console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
            for (var key in field) {
                var ss = $("#" + key + "s").text() //判断是否需要验证
                if (ss == "yes") {
                    var value = field[key]
                    var rolenames = document.getElementById(key);
                    if (value == "") {
                        var yyy = $("#" + key + "ss").text()//名称
                        var yyyy = $("#" + key + "ssss").text() //判断属性类型
                        if (yyyy == "input") {
                            rolenames.setAttribute("class", "layui-input layui-form-danger");
                            rolenames.focus();
                            layer.msg(yyy + '必填不能为空', {icon: 5, shift: 6});
                            return false;
                        } else if (yyyy == "select") {
                            rolenames.setAttribute("class", "layui-form-danger");
                            rolenames.focus();
                            layer.msg(yyy + '必选不能为空,请选择' + yyy, {icon: 5, shift: 6});
                            return false;
                        }
                    }
                }
                <%--var ssssssss = $("#" + key + "ssssssss").text() //判断是否需要验证--%>
                <%--if (ssssssss == "2") {--%>
                <%--    var yyy = $("#" + key + "ss").text()//名称--%>
                <%--    var value = field[key]--%>
                <%--    var rolenames = document.getElementById(key);--%>
                <%--    var falg = true;--%>
                <%--    $.ajax({--%>
                <%--        type: "post",--%>
                <%--        url: "<%=request.getContextPath()%>/rest/rfid/productByFileValue",--%>
                <%--        dataType: "json",--%>
                <%--        data: "name=" + key + "&value=" + value,--%>
                <%--        async: false,--%>
                <%--        success: function (msg) {--%>
                <%--            falg = msg;--%>
                <%--        }--%>
                <%--    })--%>
                <%--    if (falg == false) {--%>
                <%--        rolenames.setAttribute("class", "layui-input layui-form-danger");--%>
                <%--        rolenames.focus();--%>
                <%--        layer.msg(yyy + '已存在,请重新输入', {icon: 5, shift: 6});--%>
                <%--        return false;--%>
                <%--    }--%>
                <%--}--%>

                var pppp = $("#" + key + "sss").text()//判断类型
                if (pppp == "String") {

                }else  if(pppp == "Int"){

                    var value = field[key]
                    var rolenames = document.getElementById(key);
                    var reg =/(^[1-9]\d*$)/;
                    if (value != "") {
                        if (!reg.test(value)) {
                            var yyy = $("#" + key + "ss").text()
                            rolenames.setAttribute("class", "layui-input layui-form-danger");
                            rolenames.focus();
                            layer.msg(yyy + '输入数值有误', {icon: 5, shift: 6});
                            return false;
                        }
                    }

                } else if (pppp == "Double") {
                    var value = field[key]
                    var rolenames = document.getElementById(key);
                    var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                    if (value != "") {
                        if (!reg.test(value)) {
                            var yyy = $("#" + key + "ss").text()
                            rolenames.setAttribute("class", "layui-input layui-form-danger");
                            rolenames.focus();
                            layer.msg(yyy + '输入数值有误', {icon: 5, shift: 6});
                            return false;
                        }
                    }
                }

                    //处理复选框问题
                    var checkbox = $("#" + key + "ssss").text() //解决复选框只拿一个值的问题
                    if (checkbox == "checkbox") {
                        var industryObj = $('input[name="' + key + '"]');
                        var check_val = [];
                        var b;
                        for (k in industryObj) {
                            if (industryObj[k].checked) {
                                check_val.push(industryObj[k].value);
                            }
                        }
                        b = check_val.join(",");
                        var keys = key;
                        field[keys] = b;
                    }

                }
                var index = layer.msg('数据提交中，请稍候', {icon: 16, time: false, shade: 0.6});
                $("#pushButton").addClass("layui-btn layui-btn-disabled").prop("disabled", true);

                $.ajax({
                    type: "post",
                    url: "<%=request.getContextPath()%>/rest/rfid/addProduct",
                    dataType: "json",
                    data: field,
                    async: false,
                    success: function (msg) {
                        setTimeout(function () {
                            layer.close(index);
                            if (msg == true) {
                                layer.msg('添加成功');
                            } else {
                                layer.msg(msg.errorMsg);
                            }

                        }, 2000);
                        setTimeout(function () {
                            var indexs = parent.layer.getFrameIndex(window.name);//获取当前弹出层的层级
                            parent.layer.close(indexs);//关闭弹出层
                        }, 4000);
                    }
                })
                return false;
            }
        );


    })
</script>
</body>
</html>
